package com.mybatis.student;

import java.util.List;

public class Clbum {
    private String grade;
    private String clbum;
    private String t_Chinese;
    private String t_math;
    private String t_English;
    private String number;
    private List<Score> scores;
    private List<Teacher> teachers;

    // Getters and Setters
    public String getGrade() {
        return grade;
    }

    public void setGrade(String grade) {
        this.grade = grade;
    }

    public String getClbum() {
        return clbum;
    }

    public void setClbum(String clbum) {
        this.clbum = clbum;
    }

    public String getT_Chinese() {
        return t_Chinese;
    }

    public void setT_Chinese(String t_Chinese) {
        this.t_Chinese = t_Chinese;
    }

    public String getT_math() {
        return t_math;
    }

    public void setT_math(String t_math) {
        this.t_math = t_math;
    }

    public String getT_English() {
        return t_English;
    }

    public void setT_English(String t_English) {
        this.t_English = t_English;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public List<Score> getScores() {
        return scores;
    }

    public void setScores(List<Score> scores) {
        this.scores = scores;
    }

    public List<Teacher> getTeachers() {
        return teachers;
    }

    public void setTeachers(List<Teacher> teachers) {
        this.teachers = teachers;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("Class ID: ").append(number).append("\n");
        sb.append("Grade: ").append(grade).append("\n");
        sb.append("Class Name: ").append(clbum).append("\n");
        sb.append("Scores: \n");
        for (Score score : scores) {
            sb.append(score.toString()).append("\n");
        }
        sb.append("Teachers: \n");
        for (Teacher teacher : teachers) {
            sb.append(teacher.toString()).append("\n");
        }
        return sb.toString();
    }

    public String toString1() {
        StringBuilder sb = new StringBuilder();
        sb.append("Class ID: ").append(number).append("\n");
        sb.append("Grade: ").append(grade).append("\n");
        sb.append("Class Name: ").append(clbum).append("\n");
        sb.append("Scores: \n");
        for (Score score : scores) {
            sb.append(score.toString()).append("\n");
        }
        return sb.toString();
    }

    public String toString2() {
        StringBuilder sb = new StringBuilder();
        sb.append("Class ID: ").append(number).append("\n");
        sb.append("Grade: ").append(grade).append("\n");
        sb.append("Class Name: ").append(clbum).append("\n");
        sb.append("Teachers: \n");
        for (Teacher teacher : teachers) {
            sb.append(teacher.toString()).append("\n");
        }
        return sb.toString();
    }
}
